<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="949.27">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
span.s1 {color: #00009e}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><b>FMHEncode1<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>Second Order Ambisonic encoder</b></p>
<p class="p2"><br></p>
<p class="p3"><b>FMHEncode1.ar(in, azimuth, elevation, rho, gain, wComp)</b></p>
<p class="p2"><br></p>
<p class="p3"><b>in</b> - input signal</p>
<p class="p3"><b>azimuth</b> -<span class="Apple-converted-space">  </span>in radians, -pi to pi</p>
<p class="p3"><b>elevation</b> -<span class="Apple-converted-space">  </span>in radians, -0.5pi to +0.5pi</p>
<p class="p3"><b>rho</b> - the speaker radius (1 places shound at the radius, &lt;1 within the radius, &gt;1 is outside the radius)</p>
<p class="p3"><span class="Apple-tab-span">	</span>beyond the radius, a distance scaling is applied (no filtering is done).</p>
<p class="p3"><b>gain</b> - a control rate level input.</p>
<p class="p3"><b>wComp</b> - chooses how the W channels is scaled. If 0, a scaler of 0.707 is used. If 1, W is varied according to the scaling of the X, Y, Z, R, S, T, U, and V channels. 1 is the default.</p>
<p class="p2"><br></p>
<p class="p3">Output channels are in order W,X,Y,Z, R, S, T, U, V.</p>
<p class="p3">Because of the way the W component is scaled, it is recommended that you only decode with FMHDecode1 and it's methods.</p>
<p class="p2"><br></p>
<p class="p4">s=<span class="s1">Server</span>.internal.boot;</p>
<p class="p2"><br></p>
<p class="p4">(</p>
<p class="p4">{<span class="Apple-converted-space"> </span></p>
<p class="p4"><span class="Apple-tab-span">	</span><span class="s1">var</span> w, x, y, z, r, s, t, u, v;</p>
<p class="p4"><span class="Apple-tab-span">	</span>#w, x, y, z, r, s, t, u, v =<span class="Apple-converted-space"> </span></p>
<p class="p4"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="s1">FMHEncode1</span>.ar(<span class="s1">WhiteNoise</span>.ar.dup,<span class="s1">MouseX</span>.kr(0, 2pi), <span class="s1">MouseY</span>.kr(-0.5pi, 0.5pi) + [0, 0.5pi], 1, 0.3).sum;</p>
<p class="p4"><span class="Apple-tab-span">	</span><span class="s1">FMHDecode1</span>.cube(w, x, y, z, s, t, v);</p>
<p class="p4">}.scope(8));</p>
</body>
</html>
